# split and reverse and join str
class Solution:
    # @param s, a string
    # @return a string
    def reverseWords(self, s):
        L = s.split()
        L = L[::-1];
        return " ".join(L);

str = "Line1-abcdef Line2-abc Line4-abcd";
a = Solution();
print(a.reverseWords(str));
        

